<script setup>
import { ref,computed } from 'vue'
import { useCounterStore } from '@/stores/counter'
import { useUsernameStore } from '@/stores/username'

// 可以在组件中的任意位置访问 `store` 变量 
const store = useCounterStore()
const usernameStrore = useUsernameStore()

</script>

<template>
  <h1>游戏</h1>
  <p>{{ store.count }}</p>
  <p>{{ store.doubleCount }}</p>
  <p>{{ usernameStrore.firstAndLastName }}</p>
  <p>{{ usernameStrore.lastAndFirstName }}</p>
  <p><button @click="store.increment()">+1</button></p>
  <p><button @click="store.add">+n</button></p>
</template>

<style scoped>

</style>
